const { defineConfig } = require('@vue/cli-service')
const PLATFROM_CONFIG = require('./public/config.js')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    proxy: {
      '/api': {
        target: PLATFROM_CONFIG.PLATFROM_CONFIG.baseURL + '/api', // 'http://120.48.37.178:5001/api', // 后台接口地址
        ws: false, // wesocket
        secure: false, // 如果是https接口，需要配置这个参数
        changeOrigin: true, // 是否跨域
        pathRewrite: { // 重写路径
          '^/api': ''
        }
      }
    }
  }
})
